package cn.dansj.bean;

import cn.dansj.common.utils.json.DictMap;
import cn.dansj.common.utils.transfer.DefaultMethods;
import cn.dansj.common.utils.transfer.StringUtils;
import cn.dansj.enums.GlobalEnv;

import java.io.Serial;
import java.io.Serializable;

public class NexusRepositoryAsset extends DefaultMethods implements Serializable {
    @Serial
    private static final long serialVersionUID = GlobalEnv.SerialVersionUID;

    private String id;
    private DictMap checksum;
    private String contentType;
    private int fileSize;
    private String lastModified;
    private DictMap maven2;
    private String path;
    private String repository;
    private DictMap npm;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public DictMap getChecksum() {
        return checksum;
    }

    public void setChecksum(DictMap checksum) {
        this.checksum = checksum;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public int getFileSize() {
        return fileSize;
    }

    public void setFileSize(int fileSize) {
        this.fileSize = fileSize;
    }

    public String getLastModified() {
        return lastModified;
    }

    public void setLastModified(String lastModified) {
        this.lastModified = lastModified;
    }

    public DictMap getMaven2() {
        return maven2;
    }

    public void setMaven2(DictMap maven2) {
        this.maven2 = maven2;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getRepository() {
        return repository;
    }

    public void setRepository(String repository) {
        this.repository = repository;
    }

    public String getName() {
        return StringUtils.rSplit(path, "/", 2)[1];
    }

    public DictMap getNpm() {
        return npm;
    }

    public void setNpm(DictMap npm) {
        this.npm = npm;
    }
}
